﻿@using Ciep.WebSite.Models
@using Happy.ExtentionMethods

@helper RenderTop(TopArticles topInfo)
{
    <div class="thumbnail happy-top-article-panel">
        <h3>@topInfo.Title</h3>
        <ul class="list-unstyled">
            @{ var index = 1; }
            @foreach (var article in topInfo.Articles)
            {
                <li>
                    <span class="label label-primary">@index</span>
                    <a  href="@topInfo.DetailHref@article.Id" 
                        title="@article.Title">
                        @article.Title.Ellipsis(15)
                    </a>
                </li>
                index++;
            }
        </ul>
        <p><a class="btn btn-primary" role="button" href="@topInfo.MoreHref">更多</a></p>
    </div>
}